using ControlCenter.Data;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace ControlCenter.Operation
{
    public static class OperationServiceCollectionExtensions
    {
        public static IServiceCollection AddOperations(this IServiceCollection services, IConfiguration configuration)
        {
            services.AddRepositories(configuration);

            services.AddScoped<IPackageManagementOperation, PackageManagementOperation>();
            services.AddScoped<IRobotOperation, RobotOperation>();
            services.AddScoped<IResultCallbackOperation, ResultCallbackOperation>();
            services.AddScoped<IMyUsersOperation, MyUsersOperation>();
            services.AddScoped<IParamSettingOperation, ParamSettingOperation>();
            services.AddScoped<ILogOperation, LogOperation>();
            return services;
        }
    }
}
